package com.qiuhu.javase.innerclass;

/**
 * 内部类
 * 
 * @author Administrator
 *
 */
public class OuterClass {

	private String name;
	private String age;

	public class InnerClass {
		public InnerClass() {
			name = "qiuhu";
			age = "18";
		}

		public void display() {
			System.out.println("name=" + name + ", age=" + age);
		}

	}

	public static void main(String[] args) {
		OuterClass outerClass = new OuterClass();
		OuterClass.InnerClass innerClass = outerClass.new InnerClass();
		innerClass.display();
	}
}
